package com.kky.pp.dot

import android.content.Context
import com.appsflyer.AFInAppEventParameterName
import com.appsflyer.AFInAppEventType
import com.appsflyer.AppsFlyerLib


class AFDotLogUtil {
    fun addPurchaseEvent(context: Context?, amount: String, productCode: String) {
        val eventValue: MutableMap<String, Any> = HashMap()
        eventValue[AFInAppEventParameterName.REVENUE] = amount
        eventValue[AFInAppEventParameterName.CONTENT_TYPE] = "googlepay"
        eventValue[AFInAppEventParameterName.CONTENT_ID] = productCode
        eventValue[AFInAppEventParameterName.CURRENCY] = "USD"
        AppsFlyerLib.getInstance().logEvent(context, AFInAppEventType.PURCHASE, eventValue)
    }

    fun addRegisterEvent(context: Context?) {
        val eventValue: Map<String, Any> = HashMap()
        AppsFlyerLib.getInstance().logEvent(context, "Registration", eventValue)
    }
}